﻿<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%request.setCharacterEncoding("utf-8");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<title>jsp+servlet+bean guestbook</title>
<script language="javascript">
	<!--
	function check(){
		var title   = document.getElementById("title");
		var content = document.getElementById("content");
		if(title.value == ""){
			alert("请输入留言标题");
			return false;
		}else if(content.value == ""){
			alert("请输入留言内容");
			return false;
		}
	}
	-->
</script>
</head>

<body>
<div id="head">
	<h1>JSP+Servlet+Bean 留言本</h1>
</div>
<div id="nav">
	您的位置：<a href="index.jsp">首页</a> >> 发表留言
</div>
<div id="main">
	
    	<form id="post"  name="post" method="post" action="Post" onsubmit="return check();">
			<label>标题：<input type="text" id="title" name="title" /></label>
            <label>内容：<textarea name="content" id="content" cols="45" rows="5"></textarea></label>
            <label style="border-bottom:none"><input type="submit" value="提交" /></label>
        </form>
    
</div>
<div id="foot">
	power by diplodocus
</div>
</body>
</html>
